#include<bits/stdc++.h>
using namespace std;

int main(){
    double s,t;
    cin>>s>>t;
    int x=ceil(s/t)+10;
    int diff=60*(24+8)-x;
    int hh=(diff/60)%24;
    int mm=diff%60;
    printf("%02d:%02d\n",hh,mm);
    return 0;
}
